#ifndef __crc_H
#define __crc_H
#ifdef __cplusplus
 extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "gd32f30x.h"

extern void _Error_Handler(char *, int);

void MX_CRC_Init(void);

unsigned short update_crc(unsigned char c, unsigned short crc);
unsigned short calc_crc(unsigned char *p, unsigned char len);
unsigned char check_message_crc(unsigned char *p, unsigned char len);
#ifdef __cplusplus
}
#endif
#endif /*__ crc_H */
